package com.leff.cards.entity;

import com.google.appengine.api.datastore.Entity;
import com.leff.cards.Dictionary;

public class QueryCard extends EntityWrapper {

	public static final String KIND = "QueryCard";

	public static final String TEXT = "text";
	
	public QueryCard(String text) {
		super(KIND);
		
		setText(text);
	}
	public QueryCard(Entity E) {
		super(E);
	}
	
	public void setText(String text) {
		put(TEXT, text);
	}
	public String getText() {
		return (String)get(TEXT);
	}
	
	public Dictionary toJSON() {
		
		Dictionary obj = new Dictionary();
		obj.put(ID, getId());
		obj.put(TEXT, getText());
		
		return obj;
	}
}
